package com.anpy.management.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 项目状态枚举
 */
@Getter
@AllArgsConstructor
public enum ProjectStatusEnum {
    
    DEVELOPING("DEVELOPING", "开发中"),
    COMPLETED("COMPLETED", "开发完成"),
    ABANDONED("ABANDONED", "已废弃");
    
    private final String code;
    private final String desc;
    
    public static ProjectStatusEnum getByCode(String code) {
        for (ProjectStatusEnum status : ProjectStatusEnum.values()) {
            if (status.getCode().equals(code)) {
                return status;
            }
        }
        return null;
    }
}
